package cate.common.table.trademall.loopmonthfund;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass(value = "交易坊-月基金配置 Row")
public class LoopMonthFundCommonRow extends ERow {
    @NoteField(value = "基金期数")
    public int fundGroup;
    @NoteField(value = "优惠购买天数")
    public int discoutDay;
    @NoteField(value = "原价")
    public int price;
    @NoteField(value = "优惠价")
    public int discountPrice;
    @NoteField(value = "购买时赠送奖励")
    public String activeRewardStr;
    //    @NoteField(value = "赠送奖励邮件ID")
//    public int activeMailId;
    @NoteField(value = "过期未领邮件id")
    public int overdueMailId;
    @NoteField(value = "是否关联月卡")
    public int needMonthCard;
    @NoteField(value = "跑马灯公告")
    public int lampId;


    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        id = xrw.getInteger("ID");
        fundGroup = xrw.getInteger("基金期数");
        discoutDay = xrw.getInteger("优惠购买天数", 0);
        price = xrw.getInteger("原价", 0);
        discountPrice = xrw.getInteger("优惠价", 0);
        activeRewardStr = xrw.getString("购买时赠送奖励");
//        activeMailId = xrw.getInteger("赠送奖励邮件ID");
        overdueMailId = xrw.getInteger("过期未领邮件id", 0);
        needMonthCard = xrw.getInteger("是否关联月卡", 0);
        lampId = xrw.getInteger("跑马灯公告", 0);
    }

    @Override
    public void decode() {
        super.decode();
        price *= 100;
        discountPrice *= 100;
    }
}
